package org.ycx.generator;

import java.util.List;

/**
 * Created by 杨 on 2017-07-03.
 */
public class GenNode {

    /**
     * 字段说明
     */
    private String desc;

    private String name;

    private int maxLength = 30;
    /**
     * 数据类型
     * 0 字符串
     * 1 数字
     * 2 浮点数
     * 3.日期
     * 4.选择框
     * 5.图片
     * 6.文件
     *
     * @return
     */
    private int type = 0;

    /**
     * 小数位精度
     */
    private int precision = 2;

    private Object[] choices;

    public GenNode() {
    }

    public GenNode(String desc, String name, int maxLength) {
        this.name = name;
        this.desc = desc;
        if (maxLength > 0) {
            this.maxLength = maxLength;
        }
    }

    public Object[] getChoices() {
        return choices;
    }

    public void setChoices(Object[] choices) {
        this.choices = choices;
    }

    public int getMaxLength() {
        return maxLength;
    }

    public void setMaxLength(int maxLength) {
        this.maxLength = maxLength;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getPrecision() {
        return precision;
    }

    public void setPrecision(int precision) {
        this.precision = precision;
    }
}
